#include "../fs.cc"
#include "../trash.cc"
#include <cstdio>
// clang++ -std=c++11 trash_dir.cc -fsanitize=address -fno-omit-frame-pointer
int main(int argc, char **argv) {
  if (argc < 2) {
    fprintf(stderr, "usage: %s diskpath\n", argv[0]);
    return 1;
  }
  std::string dir;
  if (!gitee::MoveRepoToTrashEx("/home/git/repositories////",
                                "/home/git/repositories/trash", argv[1], dir)) {
    fprintf(stderr, "move repo %s to trash error: %s\n", argv[1],
            strerror(errno));
    return 1;
  }
  fprintf(stderr, "move repo %s to trash success\ntrashdir: %s\n", argv[1],
          dir.data());
  return 0;
}
